<?php

use App\Admin\Controllers\CustomerHealthController;
use Illuminate\Routing\Router;

Admin::routes();

Route::group([
    'prefix'     => config('admin.route.prefix'),
    'namespace'  => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', 'HomeController@index')->name('admin.home');
    $router->get('/tt_test-forms/has-new-form', 'XXlBaseFormController@hasNewForm');
    $router->put('/auth/switch-online', 'AuthController@switchOnline');

    $router->put('user-groups/users/{id}', "UserGroupController@updateUsers");
    $router->get('user-groups/{id}/edit-users', "UserGroupController@editUsers");

    $router->resource('auth/users', "UserController");
    $router->resource('customer-healths', "CustomerHealthController");
    $router->resource('tt_test-forms', XXlBaseFormController::class);
    $router->resource('red_book_accounts', RedBookAccountController::class);
    $router->resource('base-common-forms', BaseCommonFormController::class);
    $router->resource('questionnaires', QuestionnaireController::class);
    $router->resource('user-groups', UserGroupController::class);
});
